import request from '@/utils/request'

export function create(data) {
  return request({
    url: '/news/add',
    method: 'post',
    data
  })
}

export function getList(params) {
  return request({
    url: '/news/list',
    method: 'get',
    params: params
  })
}

export function info(params) {
  return request({
    url: '/news/info',
    method: 'get',
    params: params
  })
}

export function edit(data) {
  return request({
    url: `/news/update`,
    method: 'post',
    data
  })
}

export function Status(data) {
  return request({
    url: '/news/statusChange',
    method: 'put',
    data
  })
}

export function topStatus(data) {
  return request({
    url: '/news/topChange',
    method: 'put',
    data
  })
}

export function Del(query) {
  return request({
    url: '/news/del',
    method: 'delete',
    params: query
  })
}
